package com.usian.service;

import com.usian.mapper.UsersMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.usian.pojo.Users;

import java.util.List;

@Service
public class UsersServiceImpl {
    @Autowired
    private UsersMapper usersMapper;

    public void addUses(Users users) {
        usersMapper.insert(users);
    }

    public Users login(Users users) {
        return usersMapper.login(users);
    }

    public List<Users> findAll() {
        return usersMapper.FindAll();
    }

    public void delete(Integer id) {
        usersMapper.del(id);
    }


    public Users findOne(Integer id) {
        return usersMapper.findOne(id);
    }

    public void upp(Users users) {
        usersMapper.updateByPrimaryKey(users);
    }
}